<style lang="less">
  .mr5 {
    margin-right: 5px;
  }
  .iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 0;
  }
</style>
<template>
  <div>
  <Tabs :animated="false" @on-click="searchData(tabInfoAll.tabIndex)" v-model="tabInfoAll.tabIndex">
    <TabPane v-for="tabInfo in tabInfoAll.list" :key="tabInfo.id" :label="tabInfo.tab_name+'('+tabInfo.count+')'">
      <Row class="search-info-style">
        <Col span="6">
          <span style="text-al">申&nbsp;&nbsp;请&nbsp;&nbsp;人：</span>
          <Input style="width: 70%;" v-model="searchInfo.applyname" />
        </Col>
        <Col span="6">
          <span>业务编号：</span>
          <Input style="width: 70%;" v-model="searchInfo.order_code" />
        </Col>
        <Col span="6">
          <span>申请时间：</span>
          <DatePicker type="datetimerange" format="yyyy/MM/dd" transfer="" placement="bottom-end"
                      style="width: 70%" v-model="searchInfo.applytime"></DatePicker>
        </Col>
        <Button class="new-btn-sty" @click="searchData(tabInfoAll.tabIndex)" style="float:right">
          <Icon type="ios-clock-outline" /> 刷新
        </Button>
        <Button class="new-btn-sty" @click="searchData(tabInfoAll.tabIndex)" style="float:right">
          <Icon type="ios-search" /> 搜索
        </Button>
        <Button class="new-btn-sty" @click="exportData(tabInfoAll.tabIndex)" v-if="companyCode == 'LM40002'" style="float:right">
          <Icon type="ios-search" /> 导出数据
        </Button>
      </Row>
      <Row class="search-info-style">
        <Col span="6" style="margin-top:10px">
          <span>事项类型：</span>
          <Select v-model="searchInfo.item_type" filterable transfer="" style="width: 70%;" @on-change="changeItem1(searchInfo.item_type)">
            <Option :value="item.id" v-for="item in treelist" v-bind:key="item.id">{{item.type_name}}</Option>
          </Select>
        </Col>
        <Col span="6" style="margin-top:10px">
          <span>事项名称：</span>
          <Select v-model="searchInfo.item_id" filterable transfer="" style="width: 70%;">
            <Option :value="item.id" v-for="item in eventListSQ" v-bind:key="item.id">{{item.text}}</Option>
          </Select>
        </Col>
      </Row>
      <Row class="search-info-style" v-if="companyCode == 'LM40002'">
        <Col span="6">
          <span>业务部门：</span>
          <Select v-model="searchInfo.department_name" style="width:65%">
            <Option v-for="(item,index) in departmentList" :value="item.name" :key="index">{{ item.name }}</Option>
          </Select>
        </Col>
      </Row>
      <Table border :columns="columns1" :data="datalist" >
        <template slot-scope="{ row, index }" slot="item_title">
          <span v-if="row.state == '1' || row.state == '7'">
            <Icon type="md-alarm" style="color: #19be6b"/>
          </span>
          <span>{{row.title}}</span>
        </template>
        <template slot-scope="{ row, index }" slot="time">
          <span v-if="row.state == '1' || row.state == '81'">
            <span>{{time(row.item_time)}}</span>
          </span>
          <span v-if="row.state == '2' || row.state == '3'">
            <span v-if="row.item_num==NaN">0时0分0秒
            </span>
            <span v-else>{{times(row.item_num/60)}}</span>
          </span>
          <span v-if="row.state == '9' || row.state == '0'|| row.state == '7'|| row.state=='8'">
            <span>0时0分0秒</span>
          </span>
          <span v-if="row.state == '191' || row.state == '194' || row.state == '195'">
            <span>{{time(row.item_time)}} </span>
          </span>
          <span v-if="row.state == '192' || row.state == '193'">
            <span v-if="row.item_num==undefined">0小时</span>
            <span v-else>{{times(row.item_num)}} </span>
          </span>
        </template>
      </Table>
      <Row v-if="loadData == true">
        <Col class="demo-spin-col" span="8" offset="8">
          <Spin fix>
            <Icon type="ios-loading" size=18 class="demo-spin-icon-load"></Icon>
            <div>数据正在加载</div>
          </Spin>
        </Col>
      </Row>
      <Page class="page_style" :total="searchInfo.totalnum" :current="searchInfo.currentPageNo"
            :page-size="searchInfo.currentPageSize" @on-change="changePageNo" show-total  show-sizer @on-page-size-change="size"/>
    </TabPane>
  </Tabs>
  <!-- <Tabs size="small" @on-click="handlTabsNei">
    <TabPane :label="item.name" v-for="(item, index) in itemlist" v-bind:key="index" :name="'' + index" :index="index">
      <Table style="margin: 1px" height="360" :columns="columns2" :data="tablelist">
        <template slot-scope="{ row, index }" slot="buttons">
          <Button type="success" class="mr5" size="small" @click="todo(row)">办理</Button>
          <Button type="info" class="mr5" size="small" v-show="row.id=='11210101000000MZJD5212000330000'" @click="stodo(row)">收受分离</Button>
          <Button type="info" class="mr5" size="small" v-show="row.id=='11210101000000RSJD5212000233000'" @click="employmentPrint(row)">打印</Button>
        </template>
      </Table>
    </TabPane>
  </Tabs> -->
  <Row v-if="loadData == true">
    <Col class="demo-spin-col" span="8" offset="8">
      <Spin fix>
        <Icon type="ios-loading" size=18 class="demo-spin-icon-load"></Icon>
        <div>数据正在加载</div>
      </Spin>
    </Col>
  </Row>
  <Modal v-model="modal1" :title="modalTitle" width="600" :closable="false">
    <Form label-position="right" :label-width="100" style="position: relative;">
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">户籍情况：</Col>
        <Col span="6" class="ivu-form-item-label" v-if="registerFlag == '0'" style="text-align: left">{{register}}</Col>
        <Col span="6" class="ivu-form-item-label" v-if="registerFlag != '0'" style="text-align: left;color: red">{{register}}</Col>
        <Col span="4" class="ivu-form-item-label">低保情况：</Col>
        <Col span="6" class="ivu-form-item-label" v-if="lowInsuredFlag == '9999'" style="text-align: left;color: red">{{lowInsured}}</Col>
        <Col span="6" class="ivu-form-item-label" v-if="lowInsuredFlag != '9999'" style="text-align: left">{{lowInsured}}</Col>
      </Row>
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">残疾情况：</Col>
        <Col span="6" class="ivu-form-item-label" v-if="disabledPersonFlag == 0" style="text-align: left;">{{disabledLevel}}{{disabledPerson}}</Col>
        <Col span="6" class="ivu-form-item-label" v-if="disabledPersonFlag != 0" style="text-align: left;color:red">{{disabledLevel}}{{disabledPerson}}</Col>
        <Col span="4" class="ivu-form-item-label">殡葬情况：</Col>
        <Col span="8" class="ivu-form-item-label" v-if="funeralPersonnelFlag == 'true'" style="text-align: left;color:red">{{funeralPersonnel}}</Col>
        <Col span="7" class="ivu-form-item-label" v-if="funeralPersonnelFlag == 'false'" style="text-align: left">{{funeralPersonnel}}</Col>
      </Row>
      <Row class="mb20" v-if="item_id==='11210101000000MZJD5212000207000'">
        <Col span="4" class="ivu-form-item-label">孤儿情况：</Col>
        <Col span="6" class="ivu-form-item-label" v-if="orphan !== ''" style="text-align: left;color: red">{{orphan}}</Col>
        <Col span="6" class="ivu-form-item-label" v-if="orphan === ''" style="text-align: left">非孤儿人员</Col>
        <Col span="4" class="ivu-form-item-label">特困情况：</Col>
        <Col span="8" class="ivu-form-item-label" v-if="difficulty !== ''" style="text-align: left;color:red">{{difficulty}}</Col>
        <Col span="7" class="ivu-form-item-label" v-if="difficulty ===''" style="text-align: left">非特困人员</Col>
      </Row>
      <Row class="mb20" v-if="item_id!=='11210101000000MZJD5212000207000'">
        <Col span="4" class="ivu-form-item-label">孤儿情况：</Col>
        <Col span="6" class="ivu-form-item-label" v-if="orphan !== ''" style="text-align: left">{{orphan}}</Col>
        <Col span="6" class="ivu-form-item-label" v-if="orphan === ''" style="text-align: left">非孤儿人员</Col>
        <Col span="4" class="ivu-form-item-label">特困情况：</Col>
        <Col span="8" class="ivu-form-item-label" v-if="difficulty !== ''" style="text-align: left;color:red">{{difficulty}}</Col>
        <Col span="7" class="ivu-form-item-label" v-if="difficulty ===''" style="text-align: left">非特困人员</Col>
      </Row>
      <Row class="mb20">
        <Col span="4" class="ivu-form-item-label">工伤情况：</Col>
        <Col span="6" class="ivu-form-item-label" style="text-align: left">{{occupationa}}</Col>
        <Col span="4" class="ivu-form-item-label">年龄情况：</Col>
        <Col span="8" class="ivu-form-item-label" v-if="age > 80" style="text-align: left;color:red">80岁以上老人</Col>
        <Col span="7" class="ivu-form-item-label" v-if="age < 80 || age == 80" style="text-align: left">80岁以下（包括80岁）</Col>
      </Row>
      <Row class="mb20" v-if="subsidySituation !== ''">
        <Col span="4" class="ivu-form-item-label">补贴情况：</Col>
        <Col span="6" class="ivu-form-item-label" style="text-align: left;color:red">{{subsidySituation}}</Col>
      </Row>
    </Form>
    <div slot="footer">
      <Button type="success" @click="saveInfo()">办理</Button>
      <Button type="error" @click="modal1=false">关闭</Button>
    </div>
  </Modal>
    <Modal
      width="800"
      v-model="modal2"
      title="申请办理儿童福利证（社会散居孤儿）">
      <div>
        <template>
          <Form :model="formItem" :label-width="100" >
            <Row>
              <Col span="12">
                <FormItem label="父亲姓名：">
                  <Input v-model="formItem.fname" placeholder="请输入父亲姓名"></Input>
                </FormItem>
              </Col>
              <Col span="12">
                <FormItem label="母亲姓名：">
                  <Input v-model="formItem.mname" placeholder="请输入母亲姓名"></Input>
                </FormItem>
              </Col>
            </Row>
            <Row>
              <Col span="12">
                <FormItem label="父亲身份证号：">
                  <Input v-model="formItem.fidcard" placeholder="请输入身份证号"></Input>
                </FormItem>
              </Col>
              <Col span="12">
                <FormItem label="母亲身份证号：">
                  <Input v-model="formItem.midcard" placeholder="请输入身份证号"></Input>
                </FormItem>
              </Col>
            </Row>
            <Row>
              <Col span="12">
                <FormItem label="父亲死亡情况：">
                  <Input v-model="formItem.fregister" disabled></Input>
                </FormItem>
              </Col>
              <Col span="12">
                <FormItem label="母亲死亡情况：">
                  <Input v-model="formItem.mregister" disabled></Input>
                </FormItem>
              </Col>
            </Row>
            <Row>
              <Col span="12">
                <FormItem label="父亲残疾情况：">
                  <Input v-model="formItem.fcanji" disabled></Input>
                </FormItem>
              </Col>
              <Col span="12">
                <FormItem label="母亲残疾情况：">
                  <Input v-model="formItem.mcanji" disabled></Input>
                </FormItem>
              </Col>
            </Row>
            <FormItem label="孤儿户籍情况：">
              <Input v-model="formItem.register" disabled ></Input>
            </FormItem>
            <FormItem label="孤儿死亡情况：">
              <Input v-model="formItem.siwang" disabled ></Input>
            </FormItem>
            <FormItem label="孤儿残疾情况：">
              <Input v-model="formItem.canji" disabled ></Input>
            </FormItem>

          </Form>
        </template>
      </div>
      <div slot="footer">
        <Button type="success" size="default" @click="Orphan">办理</Button>
        <Button type="primary" size="default"  @click="getOrphanInfo">查询</Button>
      </div>
    </Modal>
    <Modal
      v-model="disModal"
      title="申请低收入一级残疾人专项救助">
      <div style="padding-right: 20px">
        <template>
          <Form :model="disFormItem" :label-width="120" >
            <FormItem label="低保户情况：">
              <Input v-model="disFormItem.dibao" disabled ></Input>
            </FormItem>
            <FormItem label="是否死亡：">
              <Input v-model="disFormItem.register" disabled ></Input>
            </FormItem>
          </Form>
        </template>
      </div>
      <div slot="footer">
        <Button type="success" @click="disCl">办理</Button>
      </div>
    </Modal>
    <Modal v-model="modal3" :title="'重复申请信息验证'" width="700" @on-cancel="modal3===false">
      <Form label-position="right" :label-width="100">
        <Row class="mb20" >
          <Col span="7" class="ivu-form-item-label">姓名：</Col>
          <Col span="12" class="ivu-form-item-content">
            <Input v-model="itemData.aac003" disabled></Input>
          </Col>
        </Row>
        <Row class="mb20">
          <Col span="7" class="ivu-form-item-label">身份证：</Col>
          <Col span="12" class="ivu-form-item-content">
            <Input v-model="itemData.aac002" disabled></Input>
          </Col>
        </Row>
        <Row class="mb20">
          <Col span="7" class="ivu-form-item-label">申请年度：</Col>
          <Col span="12" class="ivu-form-item-content">
            <Input v-model="itemData.aec01b"></Input>
          </Col>
        </Row>
        <Row class="mb20" v-if="itemInfo.id === '11210101000000CLJD5212000229005'" >
          <Col span="7" class="ivu-form-item-label">就学阶段：</Col>
          <Select v-model="itemData.aec011" style="width:334px">
            <Option v-for="item in employment.schoolStageList" :value="item.value" v-bind:key="item.value">{{item.label}}</Option>
          </Select>
        </Row>
        <Row class="mb20"><h2 style="margin-left: 120px; color: red">{{ checkTable }}</h2></Row>
      </Form>
      <div slot="footer">
        <Button type="info" @click="checkStudentInfo()">确定</Button>
        <Button @click="modal3=false">关闭</Button>
      </div>
    </Modal>
    <Modal
      v-model="jyzDZZZModal"
      width="700"
      height="700"
      title="就业创业证">
      <div v-show="jyzState" style="display: flex;justify-content: center">
          <span style="font-size:15px;text-align: center">您已办理过就业创业证！请点击下方查看按钮查看电子证！</span>
        </div>
      <div style="width:650px" v-show="imgState" id="printMe1">
        <img :src="urlL" style="width: 650px;height: 650px"/>
<!--        <Carousel v-model="picIndex" style="width:450px" dots="outside" trigger="hover">-->
<!--          <CarouselItem  v-for="(imginfo, index) in jyzDzzzUrl" :key="index">-->
<!--            <img :src="imginfo" style="width: 450px;height: 450px"/>-->
<!--          </CarouselItem>-->
<!--        </Carousel>-->
      </div>
      <div slot="footer">
        <Button type="primary" @click="jyzDZZZModal=false" >确定</Button>
        <Button type="success" v-print="'#printMe1'" v-if="imgState ">打印</Button>
        <Button type="info"  @click="findJyzDzzz" v-if="jyzState ">查看</Button>
      </div>
    </Modal>
<!--    <print-->
<!--      :employmentInfo="employmentInfo"-->
<!--      ref="testprint">-->
<!--    </print>-->
    <Modal
      v-model="employment.modelData"
      title="未办理就业创业证"
      width="400">
      <p>未办理就业创业证，请先办理成功后点击打印</p>
      <div slot="footer">
        <Button type="primary" size="large"  @click="employment.modelData = false">确定</Button>
      </div>
    </Modal>
    <Modal
      v-model="renshecuowu"
      title="注意："
      width="800">
      <div>
        <h3>
        &nbsp;&nbsp;&nbsp;&nbsp;即日起，因省人社厅及省医保局系统改造，灵活就业人员参保登记、灵活就业人员缴费档次调整、
        企业社会化管理服务整体移交退休人员采暖费报销、退休人员社会化管理信息登记四项业务在社区暂停办理，
        申请办理业务的参保人员需到所在区社会保险分中心窗口办理，何时恢复社区经办，另行通知。请各社区做好解释说明工作。具体联系电话请查看公告信息。
        </h3>
      </div>
    </Modal>
    <div>
      <wl-equipment
        ref="wlEquipment"
        @goonTodo="goonTodo"
      ></wl-equipment>
    </div>
  </div>
</template>

<script>
import { yiBaoToken, renSheToken, createPostNew, findCanlian, getRegisterInfo, getFuneralInfo, createFangChanLogin, getDifficultyByCard, getOrphanByCard, getOccupationalInfo, getInfoByCard, teKunToken, authentication, repeatApplicationValidation, createDisabilityApi, getJyzDzzzUrl, createWumiLog, date2str } from '@/api/eventlist'
import { itemtodolist } from '@/api/mainv3'
import { createPost } from '@/api/post'
import { findEmploymentInfo } from '@/api/print'
// import print from '../components/test_print'
import WlEquipment from '@/components/wl-equipment/index'
export default {
  name: 'MyTabs',
  props: {
    loaduser: Boolean,
    searchname: String,
    usernname: String,
    cardno: String
  },
  components: {
    WlEquipment
    // print
  },
  data () {
    return {
      urlL: '',
      imgState: false,
      jyzState: true,
      renshecuowu: false,
      jyzAbstractcode: '',
      jyzName: '',
      checkTable: '',
      picIndex: 0,
      jyzDzzzUrl: [],
      jyzDZZZModal: false,
      loadData: true,
      disFormItem: {
        dibao: '',
        register: ''
      },
      formItem: {
        fname: '',
        fidcard: '',
        fregister: '',
        mname: '',
        midcard: '',
        mregister: '',
        register: '',
        canji: '',
        fcanji: '',
        mcanji: '',
        siwang: ''
      },
      bank_name: '', // 开户行
      bank_peoplename: '', // 银行账户名
      bank_cardno: '', // 银行卡号
      low_income_No: '', // 低保证号
      str: '',
      GUARD_PHONE: '', // 监护人联系电话
      GUARD_NAME: '', // 监护人姓名
      RESRESIDENCEIDENCE: '', // 户口性质
      CJR_ALLOCATION_ID_NAME: '', // 社区
      FIRST_TIME: '', // 发证时间
      subsidySituation: '', // 补贴情况
      age: '',
      occupationa: '',
      item_id: '',
      difficulty: '',
      orphan: '',
      itemInfo: {},
      modalTitle: '基本情况',
      modal1: false,
      modal2: false,
      modal3: false,
      disModal: false,
      registerFlag: '',
      register: '',
      disabledPersonFlag: '',
      disabledPerson: '',
      disabledLevel: '',
      DISABLED_NUMBER: '',
      lowInsuredFlag: '',
      lowInsured: '',
      funeralPersonnelFlag: '',
      funeralPersonnel: '',
      itemlist: [],
      tablelist: [],
      item_index: 0,
      columns1: [
        { title: '',
          type: 'expand',
          width: 40,
          align: 'center',
          render: (h, params) => {
            return h(expandRow,
              {
                props: { params: params },
                on: {
                  breachRun: (type, data) => {
                    console.log(type, 6666)
                    if (type === 1) {
                      this.viewProcess(data)
                      this.modal = false
                      this.modalInfo.show = false
                      this.modal1 = false
                      this.modal2 = false
                      this.resultImg.show = false
                    } else if (type === 2) {
                      console.log(data.code, '!!!!')
                      // 调用一个方法弹出带二维码的模态框
                      var url = 'http://qstb.mzj.shenyang.gov.cn/mzmobile/#/quanshitongban/orderDetail?code=' + data.code
                      this.modal = true
                      this.modalInfo.show = false
                      this.modal1 = false
                      this.processModal.show = false
                      this.modal2 = false
                      this.resultImg.show = false
                      this.printData = data
                      this.printData.create_time = this.printData.create_time.substring(0, 10)
                      this.printData.aa = this.printData.create_time.substring(0, 4)
                      this.printData.bb = this.printData.create_time.substring(5, 7)
                      this.printData.cc = this.printData.create_time.substring(8, 10)
                      this.showModel(true, '便民服务事项受理通知单', url)
                    } else if (type === 3) {
                      this.popModal(data.data, data.key1, data.key2)
                      this.modal = false
                      this.modal1 = false
                      this.processModal.show = false
                      this.modal2 = false
                    } else if (type === 4) {
                      this.handlerItem(data.data, data.key1, data.key2)
                      this.modal = false
                      this.modal1 = false
                      this.processModal.show = false
                      this.modalInfo.show = false
                      this.modal2 = false
                    } else if (type === 5) {
                      this.processModal.show = false
                      this.modal = false
                      this.modal2 = false
                      this.modalInfo.show = false
                      this.resultImg.show = false
                      this.modal1 = true
                      this.paramsImg = data
                      this.picPreviewMol.picIndex = 0
                      this.picPreviewMol.pic_urls = data.split(',')
                      this.showModel(true, '要件预览打印', url)
                    } else if (type === 6) {
                      this.paramskImg = ''
                      if (data.item_id === '11210101000000MZJD5212000207000') {
                        getPDFByOrderCode({ code: data.code }).then(res => {
                          if (res.data.errcode === 0) {
                            this.paramskImg = 'data:application/pdf;base64,' + res.data.data
                            this.modal = false
                            this.modalInfo.show = false
                            this.modal1 = false
                            this.processModal.show = false
                            this.resultImg.show = false
                            this.modal2 = true
                            this.showModel(true, '打印表格')
                            this.refreshData()
                          } else {
                            this.$Notice.error({ title: '失败', desc: res.data.errmsg })
                          }
                        })
                      } else {
                        this.paramskImg = params.row.form_url
                        this.modal = false
                        this.modalInfo.show = false
                        this.modal1 = false
                        this.processModal.show = false
                        this.resultImg.show = false
                        this.modal2 = true
                        this.showModel(true, '打印表格')
                        this.refreshData()
                      }
                    } else if (type === 9) {
                      this.findJyzDzzz(data)
                    }
                  }
                }
              })
          }
        },
        {
          title: '事项名称',
          minWidth: 190,
          key: 'title',
          // slot: 'item_title'
          render: (h, params) => {
            let temp = []
            if (params.row.state === '1' || params.row.state === '7') {
              let create_time1 = new Date(params.row.create_time).getTime()
              create_time1 += 86400000 * params.row.PROMISE_DAY
              if ((create_time1 + 86400000 * 3) < this.today) {
                temp.push(h('Icon', { props: { type: 'md-alarm', size: '25' }, style: { color: '#f00' } }))
              } else if (create_time1 < this.today) {
                temp.push(h('Icon', { props: { type: 'md-alarm', size: '25' }, style: { color: '#f90' } }))
              }
            }
            temp.push(h('span', ' \xa0' + params.row.title))
            return h('div', temp)
          }
        },
        { title: '业务编号', key: 'code', width: 150 },
        { title: '申请人', key: 'name', width: 80 },
        { title: '手机号', key: 'mobile_encryption', width: 115 },
        { title: '身份证', key: 'cardno_encryption', width: 160 },
        { title: '状态', key: 'process_name', width: 85, align: 'center', className: 'nopadding' },
        { title: '申请时间', key: 'create_time', width: 140, align: 'center', className: 'nopadding' },
        { title: '办结时长', slot: 'time', width: 140, align: 'center', className: 'nopadding' },
        {
          title: '操作',
          key: 'action',
          align: 'center',
          className: 'nopadding',
          minWidth: 130,
          render: (h, params) => {
            let temp = []
            let action1 = '{}'
            if (params.row.action) {
              action1 = JSON.parse(params.row.action)
            }
            for (let key in action1) {
              if (action1[key].type === 'button' && action1[key].next_process_id !== '-1') {
                temp.push(
                  h('Button', {
                    props: { type: 'success', size: 'small' },
                    style: { marginRight: '5px', marginTop: '2px', marginBottom: '2px' },
                    on: {
                      click: () => {
                        // 操作类型非下划线开头时，表示功能按钮
                        if (action1[key].params_type && action1[key].params_type.indexOf('_') !== 0) {
                          this.modal = false
                          this.modal1 = false
                          this.processModal.show = false
                          this.modal2 = false
                          this.resultImg.show = false
                          this.popModal(params.row, action1[key], key)
                        } else {
                          this.modal = false
                          this.modal1 = false
                          this.processModal.show = false
                          this.modal2 = false
                          this.resultImg.show = false
                          this.handlerItem(params.row, key, action1[key])
                        }
                      }
                    }
                  }, action1[key].name)
                )
              }
            }
            // 除了草稿状态，其他都默认加上查看按钮
            if (params.row.state === '9' || params.row.state === '0') {
              temp.push(
                h('Button', {
                  props: { type: 'info', size: 'small' },
                  style: { marginRight: '5px', marginTop: '2px', marginBottom: '2px' },
                  on: {
                    click: () => {
                      this.updateInfo(params.row, '1')
                    }
                  }
                }, '编辑')
              )
              temp.push(
                h('Button', {
                  props: { type: 'error', size: 'small' },
                  style: { marginRight: '5px', marginTop: '2px', marginBottom: '2px' },
                  on: {
                    click: () => {
                      this.deleteModal = true
                      this.deleteMsg = params.row
                    }
                  }
                }, '删除')
              )
              if (params.row.order_del_flag === '0') {
                temp.push(
                  h('Button', {
                    props: { type: 'error', size: 'small' },
                    style: { marginRight: '5px', marginTop: '2px', marginBottom: '2px' },
                    on: {
                      click: () => {
                        this.deleteInfo(params.row)
                      }
                    }
                  }, '撤销')
                )
              }
            } else if (params.row.state === '3') {
              temp.push(
                h('Button', {
                  props: { type: 'error', size: 'small' },
                  style: { marginRight: '5px', marginTop: '2px', marginBottom: '2px' },
                  on: {
                    click: () => {
                      this.copyModal = true
                      this.copyCode = params.row.code
                    }
                  }
                }, '复制')
              )
              temp.push(
                h('Button', {
                  props: { type: 'info', size: 'small' },
                  style: { marginRight: '5px', marginTop: '2px', marginBottom: '2px', backgroundColor: '#235CA7', borderColor: '#235CA7' },
                  on: {
                    click: () => {
                      this.updateInfo(params.row, '2')
                    }
                  }
                }, '查看')
              )
            } else {
              temp.push(
                h('Button', {
                  props: { type: 'info', size: 'small' },
                  style: { marginRight: '5px', marginTop: '2px', marginBottom: '2px', backgroundColor: '#235CA7', borderColor: '#235CA7' },
                  on: {
                    click: () => {
                      this.updateInfo(params.row, '2')
                    }
                  }
                }, '查看')
              )
            }
            if (params.row.state === '2' || params.row.state === '3') {
              temp.push(
                h('Button', {
                  props: { type: 'info', size: 'small' },
                  style: { marginRight: '5px', marginTop: '2px', marginBottom: '2px' },
                  on: {
                    click: () => {
                      this.hcp(params.row)
                    }
                  }
                }, '好差评')
              )
            }
            // if (params.row.state === '2' || params.row.state === '3') {
            //   temp.push(
            //     h('Button', {
            //       props: { type: 'info', size: 'small' },
            //       style: { marginRight: '5px', marginTop: '2px', marginBottom: '2px' },
            //       on: {
            //         click: () => {
            //           this.myd(params.row)
            //         }
            //       }
            //     }, '满意度评价'),
            //     h('Button', {
            //       props: { type: 'info', size: 'small' },
            //       style: { marginRight: '5px', marginTop: '2px', marginBottom: '2px' },
            //       on: {
            //         click: () => {
            //           this.mydL(params.row)
            //         }
            //       }
            //     }, '领导评价'),
            //     h('Button', {
            //       props: { type: 'info', size: 'small' },
            //       style: { marginRight: '5px', marginTop: '2px', marginBottom: '2px' },
            //       on: {
            //         click: () => {
            //           this.emsmodal.show = true
            //           let param = {
            //             order_code: params.row.code
            //           }
            //           getOrdeEMS(param).then(res => {
            //             if (res.data.errcode === 0) {
            //               this.emsinfo.ems_number = res.data.data.ems_number
            //             } else {
            //               this.createEmsNo('EE', 'CN')
            //             }
            //           })
            //           this.emsinfo.code = params.row.code
            //           this.emsinfo.name = params.row.name
            //           this.emsinfo.mobile_encryption = params.row.mobile_encryption
            //           this.emsinfo.cardno_encryption = params.row.cardno_encryption
            //           this.emsinfo.process_name = params.row.process_name
            //           this.emsinfo.create_time = params.row.create_time
            //         }
            //       }
            //     }, '需邮寄')
            //   )
            // }
            return h('div', temp)
          }
        }
      ],
      employmentInfo: {
      },
      itemData: {},
      employment: {
        schoolStageList: [
          { value: '1', label: '学龄前' },
          { value: '2', label: '小学' },
          { value: '3', label: '初中' },
          { value: '4', label: '高中(中专)' }
        ],
        modelData: false
      },
      tabInfoAll: {
        tabIndex: 0,
        listIndex: { a0: 2, a1: 3, a2: 6, a3: 7, a7: 5, a8: 4, a81: 4, a82: 4, a9: 1 },
        list: [
          { id: '1', tab_name: '全部', count: 0, state: null },
          { id: '2', tab_name: '待提报', count: 0, state: '9' },
          { id: '3', tab_name: '待受理', count: 0, state: '0' },
          { id: '4', tab_name: '办理中', count: 0, state: '1' },
          { id: '5', tab_name: '转件中', count: 0, state: '8,81,82' },
          { id: '6', tab_name: '待办结', count: 0, state: '7' },
          { id: '7', tab_name: '办结成功', count: 0, state: '2' },
          { id: '8', tab_name: '办结失败', count: 0, state: '3' }
        ]
      }
    }
  },
  methods: {
    saveJyzDzzz () {

    },
    findJyzDzzz () {
      this.jyzState = true
      this.imgState = false
      this.jyzDzzzUrl = []
      if (this.jyzName === undefined || this.jyzName === null || this.jyzName === '') {
        this.$Notice.error({ title: '错误', desc: '没有电子证提取码无法获取电子图片' })
      } else {
        let data = {
          cardno: this.cardno,
          document_name: 'param409',
          jyzdzzz: this.jyzAbstractcode,
          name: this.jyzName

        }
        getJyzDzzzUrl(data).then(res => {
          if (res.data.errcode === 0) {
            let url = res.data.data.url.toString().substring(0, res.data.data.url.toString().length - 1)
            let start = url.lastIndexOf(',')
            // this.jyzDzzzUrl = start.substring(start, url.length).split(',')
            this.urlL = url.substring(start + 1, url.length)
            console.log(this.urlL)
            this.jyzState = false
            this.imgState = true
          } else {
            this.$Notice.error({ title: '错误', desc: res.data.errmsg })
          }
        })
      }
    },
    disCl () {
      // console.log(this.cardno)
      this.$router.push({
        name: 'handinformation',
        params: {
          itemid: '11210101000000CLJD5212000201000',
          cardno: this.cardno,
          operation: '1'
        }
      })
    },
    Orphan () {
      this.$router.push({
        name: 'handinformation',
        params: {
          itemid: '11210101000000MZJD5212000222000',
          cardno: this.cardno,
          operation: '1'
        }
      })
    },
    // 孤儿父母信息查询
    getOrphanInfo () {
      var params1 = {
        method: 'getQSTBCardInfo',
        disabled_data: {
          'item_id': '11210101000000MZJD5212000222000',
          'cardno': this.formItem.fidcard
        },
        accountid: 'qstb'
      }
      createDisabilityApi(params1).then(ret => {
        if (ret.data.errcode === 0) {
          if (ret.data.data.errcode === 0) {
            if (!ret.data.data.data.getFuneralInfoMap.hhsj) {
              this.formItem.fregister = '未死亡'
            } else {
              this.formItem.fregister = '死亡时间' + ret.data.data.data.getFuneralInfoMap.hhsj
            }
          }
        }
      })
      var params2 = {
        method: 'getQSTBCardInfo',
        disabled_data: {
          'item_id': '11210101000000MZJD5212000222000',
          'cardno': this.formItem.midcard
        },
        accountid: 'qstb'
      }
      createDisabilityApi(params2).then(ret => {
        if (ret.data.errcode === 0) {
          if (ret.data.data.errcode === 0) {
            if (!ret.data.data.data.getFuneralInfoMap.hhsj) {
              this.formItem.mregister = '未死亡'
            } else {
              this.formItem.mregister = '死亡时间' + ret.data.data.data.getFuneralInfoMap.hhsj
            }
          }
        }
      })
      var params3 = {
        method: 'getQSTBCardInfo',
        disabled_data: {
          'item_id': '11210101000000MZJD5212000222000',
          'cardno': this.formItem.midcard
        },
        accountid: 'qstb'
      }
      createDisabilityApi(params3).then(ret => {
        if (ret.data.errcode === 0) {
          // console.log('********')
          if (ret.data.data.errcode === 0) {
            // console.log('********-----')
            let msg = ret.data.data.data.findCanlianMap
            if (msg.length === 0) {
              this.formItem.mcanji = '非残疾人'
            } else {
              this.formItem.mcanji = msg[0].DISABLED_LEVEL + ',' + msg[0].DISABLED_TYPE_NAME
            }
            if (!ret.data.data.data.getFuneralInfoMap.hhsj) {
              this.formItem.siwang = '未死亡'
            } else {
              this.formItem.siwang = '死亡时间' + ret.data.data.data.getFuneralInfoMap.hhsj
            }
          }
        }
      })
      var params4 = {
        method: 'getQSTBCardInfo',
        disabled_data: {
          'item_id': '11210101000000MZJD5212000222000',
          'cardno': this.formItem.fidcard
        },
        accountid: 'qstb'
      }
      createDisabilityApi(params4).then(ret => {
        if (ret.data.errcode === 0) {
          // console.log('********')
          if (ret.data.data.errcode === 0) {
            // console.log('********-----')
            let msg = ret.data.data.data.findCanlianMap
            if (msg.length === 0) {
              this.formItem.fcanji = '非残疾人'
            } else {
              this.formItem.fcanji = msg[0].DISABLED_LEVEL + ',' + msg[0].DISABLED_TYPE_NAME
            }
          }
        }
      })
    },
    // 切换表格
    handlTabsNei (index) {
      this.item_index = index
      this.filterData()
    },
    // 根据搜索框内关键字筛选事项列表
    filterData () {
      let datalist = this.itemlist[this.item_index].datalist || []
      this.tablelist = []
      if (this.searchname) {
        datalist.forEach(element => {
          if (element.text.indexOf(this.searchname) >= 0) {
            this.tablelist.push(element)
          }
        })
      } else {
        this.tablelist = datalist
      }
    },
    todo (item) {
      console.log('banlishixiang', item.type_id)
      // this.$refs.wlEquipment.readIdCard(item)
      if (this.loaduser) {
        if (item.startTime && item.endTime) {
          // 获取当前时间
          let nowDate = date2str(new Date())
          console.log(nowDate)

          if (nowDate < item.startTime || nowDate > item.endTime) {
            this.$Notice.warning({ title: '不在办理时间内', desc: '请在' + item.startTime + '到' + item.endTime + '办理该事项' })
            return
          }
        }
        if (item.type_id === '112101010000YLBZJD') {
          console.log('医保点击办结成功')
          let wumilog = {
            cardno: this.cardno,
            item_id: item.type_id,
            item_name: item.text
          }
          console.log('保存无密登录log', wumilog)
          createWumiLog(wumilog).then(ret => {})
          yiBaoToken({}).then(ret => {
            if (ret.data.data) {
              window.open(ret.data.data.url, '_blank')
            } else {
              this.$Notice.error({ title: '错误', desc: '获取链接失败，请重试' })
            }
          })
        } else if (item.id === '11210101000000CLJD5212000201000') {
          this.getHouseholdRegister()
          if (this.register === '死亡') {
            this.disFormItem.register = '死亡'
          } else {
            this.disFormItem.register = '未死亡'
          }
          this.getLowPerson()
          var param1 = {
            'request_map': {
              'azcp0001': this.cardno
            },
            'headers_map': {
              'serialNumber': this.str,
              'idcardNumber': this.cardno
            },
            'url': 'base/queryAssistanceDetail',
            'code': this.cardno
          }
          createPostNew(param1).then(ret => {
            if (ret.data.errcode === 0) {
              if (ret.data.data.rescode === '0000') {
                // this.disFormItem.dibao = ret.data.data.data.type
                // console.log('dis' + )
                if (ret.data.data.data.type === '1010') {
                  this.disFormItem.dibao = '城市低保对象'
                } else if (ret.data.data.data.type === '1020') {
                  this.disFormItem.dibao = '城市边缘户对象'
                } else if (ret.data.data.data.type === '1030') {
                  this.disFormItem.dibao = '农村低保对象'
                } else if (ret.data.data.data.type === '1040') {
                  this.disFormItem.dibao = '农村边缘户对象'
                } else if (ret.data.data.data.type === '9999') {
                  this.disFormItem.dibao = '非保障对象'
                }
              }
            }
          })
          this.disModal = true
        } else if (item.id === '11210101000000MZJD5212000222000') {
          let data = {
            IDcard: this.cardno,
            Name: this.usernname,
            cardno: this.cardno,
            method: 'getQSTBCardInfo',
            disabled_data: {
              'item_id': '11210101000000MZJD5212000222000',
              'cardno': this.cardno
            },
            accountid: 'qstb'
          }
          getRegisterInfo(data).then(ret => {
            if (ret.data.errcode === 0) {
              if (ret.data.data.result === '-1') {
                this.formItem.register = '非沈阳户籍'
              } else if (ret.data.data.result === '0') {
                this.formItem.register = '沈阳有效户籍'
              } else if (ret.data.data.result === '1') {
                this.formItem.register = '户籍已删除'
              } else if (ret.data.data.result === '2') {
                this.formItem.register = '户籍被加锁'
              } else if (ret.data.data.result === '3') {
                this.formItem.register = '重错号'
              } else if (ret.data.data.result === '4') {
                this.formItem.register = '跨市重错号'
              } else if (ret.data.data.result === '6') {
                this.formItem.register = '持证'
              } else if (ret.data.data.result === '7') {
                this.formItem.register = '在逃犯'
              } else if (ret.data.data.result === '8') {
                this.formItem.register = '户籍已迁出沈阳'
              } else if (ret.data.data.result === '9') {
                this.formItem.register = '死亡'
              }
            } else {
              this.formItem.register = '查询失败'
            }
          })
          createDisabilityApi(data).then(ret => {
            if (ret.data.errcode === 0) {
              // console.log('********')
              if (ret.data.data.errcode === 0) {
                // console.log('********-----')
                let msg = ret.data.data.data.findCanlianMap
                if (msg.length === 0) {
                  this.formItem.canji = '非残疾人'
                } else {
                  this.formItem.canji = msg[0].DISABLED_LEVEL + ',' + msg[0].DISABLED_TYPE_NAME
                }
                if (!ret.data.data.data.getFuneralInfoMap.hhsj) {
                  this.formItem.siwang = '未死亡'
                } else {
                  this.formItem.siwang = '死亡时间' + ret.data.data.data.getFuneralInfoMap.hhsj
                }
              }
            }
          })
          // findCanlian(data).then(ret => {
          //   if (ret.data.errcode === 0) {
          //     if (ret.data.data === null) {
          //       this.formItem.canji = '非残疾人'
          //     } else {
          //       this.formItem.canji = ret.data.data[0].DISABLED_LEVEL + ',' + ret.data.data[0].DISABLED_TYPE_NAME
          //     }
          //   }
          // })
          this.modal2 = true
        } else if (item.id === '11210101000000RSJD5212000263000' || item.id === '11210101000000RSJD5212000252000' ||
        item.id === '11210101000000RSJD5212000289000' || item.id === '11210101000000RSJD5212000267000') {
          let wumilog = {
            cardno: this.cardno,
            item_id: item.type_id,
            item_name: item.text
          }
          let a = 1
          let b = 1
          // 人社事项暂停!
          if (a === b) {
            this.renshecuowu = true
            return
          }
          console.log('保存无密登录log', wumilog)
          createWumiLog(wumilog).then(ret => {})
          renSheToken({}).then(ret => {
            if (ret.data.data) {
              window.open(ret.data.data.url, '_blank')
            } else {
              this.$Notice.error({ title: '错误', desc: '获取链接失败，请重试' })
            }
          })
        } else if (item.id === '11210101000000MZJD5212000330000' || item.id === '11210101000000MZJD5212000351000') {
          this.$router.push({
            name: 'subsistenceapplication',
            params: {
              cardno: this.cardno,
              name: this.usernname,
              operation: '1',
              itemid: item.id
            }
          })
        } else if (item.id === '11210101000000MZJD5212000322000') {
          this.$router.push({
            name: 'tk_subsistenceapplication',
            params: {
              cardno: this.cardno,
              name: this.usernname,
              operation: '1',
              itemid: item.id
            }
          })
        } else if (item.id === '11210101000000MZJD5212000328000') {
          this.$router.push({
            name: 'transregionalmigration',
            params: {
              cardno: this.cardno,
              operation: '1'
            }
          })
        } else if (item.id === '11210101000000MZJD5212000173000') {
          this.$router.push({
            name: 'stopinsurance',
            params: {
              cardno: this.cardno,
              operation: '1'
            }
          })
        } else if (item.type_id === '11210101000000FCJD' && item.id !== '11210101000000FCJD5212000334000' && item.id !== '11210101000000FCJD5212000472000' && item.id !== '11210101000000FCJD5212000473000') {
          this.$router.push({
            name: 'house_handinformation',
            params: {
              itemid: item.id,
              cardno: this.cardno,
              operation: '1',
              interface_code: item.interface_code
            }
          })
        } else if (item.id === '11210101000000RSJD5212000232000' || item.id === '11210101000000RSJD5212000244000' || item.id === '11210101000000RSJD5212000410000') {
          let param = {
            apiName: 'sq4zjbxx',
            aac002: this.cardno
          }
          createPost(param).then(ret => {
            console.log(ret, 'rrrrrr')
            if (ret.data.data.msg === '没有查询到结果') {
              this.$Notice.error({ title: '错误', desc: '无就业创业证,请先办理就业创业证' })
            } else {
              this.$router.push({
                name: 'handinformation',
                params: { itemid: item.id, cardno: this.cardno, operation: '1' }
              })
            }
          })
        } else if (item.id === '11210101000000RSJD5212000233000') {
          let param = {
            apiName: 'sq4zecert',
            aac002: this.cardno
          }
          createPost(param).then(ret => {
            if (ret.data.data.result === '1') {
              console.log()
              this.jyzAbstractcode = ret.data.data.abstractcode
              this.jyzName = this.usernname
              this.jyzDZZZModal = true
            } else {
              this.$router.push({
                name: 'handinformation',
                params: { itemid: item.id, cardno: this.cardno, operation: '1' }
              })
            }
          })
        } else if (item.id === '11210101000000MZJD5212000207000' || item.id === '11210101000000MZJD5212000216000') { // 残疾人两补
          console.log('办理残疾人两补事项')
          this.getDisabledInfo(item.id, this.cardno)
          this.item_id = item.id
          // 调用对接接口
          this.itemInfo = item
          // this.getInfoByCard(item.id)
          this.getHouseholdRegister()
          // this.getDisablePerson(item.id)
          this.getLowPerson()
          // this.getFuneral()
          this.getOrphanByCard()
          this.getDifficultyByCard()
          this.getOccupationalInfo()
          this.age = this.getAge(this.cardno)
          this.modal1 = true
        } else if (item.id === '11210101000000FCJD5212000334000' || item.id === '11210101000000FCJD5212000472000' || item.id === '11210101000000FCJD5212000473000') { // 房产租赁事项房屋租赁登记备案证明
          let wumilog = {
            cardno: this.cardno,
            item_id: item.type_id,
            item_name: item.text
          }
          console.log('保存无密登录log', wumilog)
          createWumiLog(wumilog).then(ret => {})
          createFangChanLogin({}).then(res => {
            if (res.data.errcode === 0) {
              const { href } = this.$router.resolve({
                path: '/newhouserent',
                query: {
                  request_url: res.data.data.request_url,
                  browse_url: res.data.data.browse_url
                }
              })
              window.open(href, '_blank')
            } else {
              this.$Notice.error({ title: '失败', desc: res.data.errmsg })
            }
          })
        } else if (item.id === '11210101000000MZJD5212000322000') { // 房产租赁事项房屋租赁登记备案证明
          let wumilog = {
            cardno: this.cardno,
            item_id: item.type_id,
            item_name: item.text
          }
          console.log('保存无密登录log', wumilog)
          createWumiLog(wumilog).then(ret => {})
          teKunToken({}).then(ret => {
            if (ret.data.data) {
              window.open(ret.data.data.url, '_blank')
            } else {
              this.$Notice.error({ title: '错误', desc: '获取链接失败，请重试' })
            }
          })
        } else if (item.id === '11210101000000CLJD5212000229005' || item.id === '11210101000000CLJD5212000229004' || item.id === '11210101000000CLJD5212000229003' || item.id === '11210101000000CLJD5212000229002' || item.id === '11210101000000CLJD5212000229001') {
          this.getDisabledInfo(item.id, this.cardno)
          this.item_id = item.id
          // 调用对接接口
          this.itemInfo = item
          // this.getInfoByCard(item.id)
          this.getHouseholdRegister()
          // this.getDisablePerson(item.id)
          this.getLowPerson()
          // this.getFuneral()
          this.getOrphanByCard()
          this.getDifficultyByCard()
          this.getOccupationalInfo()
          this.age = this.getAge(this.cardno)
          this.modal1 = true
        } else {
          this.$router.push({
            name: 'handinformation',
            params: {
              itemid: item.id,
              cardno: this.cardno,
              operation: '1'
            }
          })
        }
      } else {
        this.$Notice.warning({ title: '无用户信息', desc: '请先获取用户信息后再办理事项' })
      }
    },
    goonTodo (item) {
      if (this.loaduser) {
        if (item.type_id === '112101010000YLBZJD') {
          console.log('医保点击办结成功')
          let wumilog = {
            cardno: this.cardno,
            item_id: item.type_id,
            item_name: item.text
          }
          console.log('保存无密登录log', wumilog)
          createWumiLog(wumilog).then(ret => {})
          yiBaoToken({}).then(ret => {
            if (ret.data.data) {
              window.open(ret.data.data.url, '_blank')
            } else {
              this.$Notice.error({ title: '错误', desc: '获取链接失败，请重试' })
            }
          })
        } else if (item.id === '11210101000000CLJD5212000201000') {
          this.getHouseholdRegister()
          if (this.register === '死亡') {
            this.disFormItem.register = '死亡'
          } else {
            this.disFormItem.register = '未死亡'
          }
          this.getLowPerson()
          var param1 = {
            'request_map': {
              'azcp0001': this.cardno
            },
            'headers_map': {
              'serialNumber': this.str,
              'idcardNumber': this.cardno
            },
            'url': 'base/queryAssistanceDetail',
            'code': this.cardno
          }
          createPostNew(param1).then(ret => {
            if (ret.data.errcode === 0) {
              if (ret.data.data.rescode === '0000') {
                // this.disFormItem.dibao = ret.data.data.data.type
                // console.log('dis' + )
                if (ret.data.data.data.type === '1010') {
                  this.disFormItem.dibao = '城市低保对象'
                } else if (ret.data.data.data.type === '1020') {
                  this.disFormItem.dibao = '城市边缘户对象'
                } else if (ret.data.data.data.type === '1030') {
                  this.disFormItem.dibao = '农村低保对象'
                } else if (ret.data.data.data.type === '1040') {
                  this.disFormItem.dibao = '农村边缘户对象'
                } else if (ret.data.data.data.type === '9999') {
                  this.disFormItem.dibao = '非保障对象'
                }
              }
            }
          })
          this.disModal = true
        } else if (item.id === '11210101000000MZJD5212000222000') {
          let data = {
            IDcard: this.cardno,
            Name: this.usernname,
            cardno: this.cardno,
            method: 'getQSTBCardInfo',
            disabled_data: {
              'item_id': '11210101000000MZJD5212000222000',
              'cardno': this.cardno
            },
            accountid: 'qstb'
          }
          getRegisterInfo(data).then(ret => {
            if (ret.data.errcode === 0) {
              if (ret.data.data.result === '-1') {
                this.formItem.register = '非沈阳户籍'
              } else if (ret.data.data.result === '0') {
                this.formItem.register = '沈阳有效户籍'
              } else if (ret.data.data.result === '1') {
                this.formItem.register = '户籍已删除'
              } else if (ret.data.data.result === '2') {
                this.formItem.register = '户籍被加锁'
              } else if (ret.data.data.result === '3') {
                this.formItem.register = '重错号'
              } else if (ret.data.data.result === '4') {
                this.formItem.register = '跨市重错号'
              } else if (ret.data.data.result === '6') {
                this.formItem.register = '持证'
              } else if (ret.data.data.result === '7') {
                this.formItem.register = '在逃犯'
              } else if (ret.data.data.result === '8') {
                this.formItem.register = '户籍已迁出沈阳'
              } else if (ret.data.data.result === '9') {
                this.formItem.register = '死亡'
              }
            } else {
              this.formItem.register = '查询失败'
            }
          })
          createDisabilityApi(data).then(ret => {
            if (ret.data.errcode === 0) {
              // console.log('********')
              if (ret.data.data.errcode === 0) {
                // console.log('********-----')
                let msg = ret.data.data.data.findCanlianMap
                if (msg.length === 0) {
                  this.formItem.canji = '非残疾人'
                } else {
                  this.formItem.canji = msg[0].DISABLED_LEVEL + ',' + msg[0].DISABLED_TYPE_NAME
                }
                if (!ret.data.data.data.getFuneralInfoMap.hhsj) {
                  this.formItem.siwang = '未死亡'
                } else {
                  this.formItem.siwang = '死亡时间' + ret.data.data.data.getFuneralInfoMap.hhsj
                }
              }
            }
          })
          // findCanlian(data).then(ret => {
          //   if (ret.data.errcode === 0) {
          //     if (ret.data.data === null) {
          //       this.formItem.canji = '非残疾人'
          //     } else {
          //       this.formItem.canji = ret.data.data[0].DISABLED_LEVEL + ',' + ret.data.data[0].DISABLED_TYPE_NAME
          //     }
          //   }
          // })
          this.modal2 = true
        } else if (item.id === '11210101000000RSJD5212000263000' || item.id === '11210101000000RSJD5212000252000' ||
        item.id === '11210101000000RSJD5212000289000' || item.id === '11210101000000RSJD5212000267000') {
          let wumilog = {
            cardno: this.cardno,
            item_id: item.type_id,
            item_name: item.text
          }
          let a = 1
          let b = 1
          // 人社事项暂停!
          if (a === b) {
            this.renshecuowu = true
            return
          }
          console.log('保存无密登录log', wumilog)
          createWumiLog(wumilog).then(ret => {})
          renSheToken({}).then(ret => {
            if (ret.data.data) {
              window.open(ret.data.data.url, '_blank')
            } else {
              this.$Notice.error({ title: '错误', desc: '获取链接失败，请重试' })
            }
          })
        } else if (item.id === '11210101000000MZJD5212000330000' || item.id === '11210101000000MZJD5212000351000') {
          this.$router.push({
            name: 'subsistenceapplication',
            params: {
              cardno: this.cardno,
              name: this.usernname,
              operation: '1',
              itemid: item.id
            }
          })
        } else if (item.id === '11210101000000MZJD5212000322000') {
          this.$router.push({
            name: 'tk_subsistenceapplication',
            params: {
              cardno: this.cardno,
              name: this.usernname,
              operation: '1',
              itemid: item.id
            }
          })
        } else if (item.id === '11210101000000MZJD5212000328000') {
          this.$router.push({
            name: 'transregionalmigration',
            params: {
              cardno: this.cardno,
              operation: '1'
            }
          })
        } else if (item.id === '11210101000000MZJD5212000173000') {
          this.$router.push({
            name: 'stopinsurance',
            params: {
              cardno: this.cardno,
              operation: '1'
            }
          })
        } else if (item.type_id === '11210101000000FCJD' && item.id !== '11210101000000FCJD5212000334000' && item.id !== '11210101000000FCJD5212000472000' && item.id !== '11210101000000FCJD5212000473000') {
          this.$router.push({
            name: 'house_handinformation',
            params: {
              itemid: item.id,
              cardno: this.cardno,
              operation: '1',
              interface_code: item.interface_code
            }
          })
        } else if (item.id === '11210101000000RSJD5212000232000' || item.id === '11210101000000RSJD5212000244000' || item.id === '11210101000000RSJD5212000410000') {
          let param = {
            apiName: 'sq4zjbxx',
            aac002: this.cardno
          }
          createPost(param).then(ret => {
            console.log(ret, 'rrrrrr')
            if (ret.data.data.msg === '没有查询到结果') {
              this.$Notice.error({ title: '错误', desc: '无就业创业证,请先办理就业创业证' })
            } else {
              this.$router.push({
                name: 'handinformation',
                params: { itemid: item.id, cardno: this.cardno, operation: '1' }
              })
            }
          })
        } else if (item.id === '11210101000000RSJD5212000233000') {
          let param = {
            apiName: 'sq4zecert',
            aac002: this.cardno
          }
          createPost(param).then(ret => {
            if (ret.data.data.result === '1') {
              console.log()
              this.jyzAbstractcode = ret.data.data.abstractcode
              this.jyzName = this.usernname
              this.jyzDZZZModal = true
            } else {
              this.$router.push({
                name: 'handinformation',
                params: { itemid: item.id, cardno: this.cardno, operation: '1' }
              })
            }
          })
        } else if (item.id === '11210101000000MZJD5212000207000' || item.id === '11210101000000MZJD5212000216000') { // 残疾人两补
          console.log('办理残疾人两补事项')
          this.getDisabledInfo(item.id, this.cardno)
          this.item_id = item.id
          // 调用对接接口
          this.itemInfo = item
          // this.getInfoByCard(item.id)
          this.getHouseholdRegister()
          // this.getDisablePerson(item.id)
          this.getLowPerson()
          // this.getFuneral()
          this.getOrphanByCard()
          this.getDifficultyByCard()
          this.getOccupationalInfo()
          this.age = this.getAge(this.cardno)
          this.modal1 = true
        } else if (item.id === '11210101000000FCJD5212000334000' || item.id === '11210101000000FCJD5212000472000' || item.id === '11210101000000FCJD5212000473000') { // 房产租赁事项房屋租赁登记备案证明
          let wumilog = {
            cardno: this.cardno,
            item_id: item.type_id,
            item_name: item.text
          }
          console.log('保存无密登录log', wumilog)
          createWumiLog(wumilog).then(ret => {})
          createFangChanLogin({}).then(res => {
            if (res.data.errcode === 0) {
              const { href } = this.$router.resolve({
                path: '/newhouserent',
                query: {
                  request_url: res.data.data.request_url,
                  browse_url: res.data.data.browse_url
                }
              })
              window.open(href, '_blank')
            } else {
              this.$Notice.error({ title: '失败', desc: res.data.errmsg })
            }
          })
        } else if (item.id === '11210101000000MZJD5212000322000') { // 房产租赁事项房屋租赁登记备案证明
          let wumilog = {
            cardno: this.cardno,
            item_id: item.type_id,
            item_name: item.text
          }
          console.log('保存无密登录log', wumilog)
          createWumiLog(wumilog).then(ret => {})
          teKunToken({}).then(ret => {
            if (ret.data.data) {
              window.open(ret.data.data.url, '_blank')
            } else {
              this.$Notice.error({ title: '错误', desc: '获取链接失败，请重试' })
            }
          })
        } else {
          this.$router.push({
            name: 'handinformation',
            params: {
              itemid: item.id,
              cardno: this.cardno,
              operation: '1'
            }
          })
        }
      } else {
        this.$Notice.warning({ title: '无用户信息', desc: '请先获取用户信息后再办理事项' })
      }
    },
    stodo (item) {
      if (this.loaduser) {
        let itemid = item.id + ''
        if (item.type_id === '12210100738669464Y') {
          yiBaoToken({}).then(ret => {
            if (ret.data.data) {
              window.open(ret.data.data.url, '_blank')
            } else {
              this.$Notice.error({ title: '错误', desc: '获取链接失败，请重试' })
            }
          })
        } else if (itemid === '11210101000000MZJD5212000330000') {
          this.$router.push({
            name: 'handinformation',
            params: {
              itemid: '372510',
              cardno: this.cardno,
              operation: '1'
            }
          })
        }
      } else {
        this.$Notice.warning({ title: '无用户信息', desc: '请先获取用户信息后再办理事项' })
      }
    },
    btodo (item) {
      if (this.loaduser) {
        let itemid = item.id + ''
        if (item.type_id === '12210100738669464Y' || itemid === '11210101000000RSJD5212000263000' || itemid === '11210101000000RSJD5212000252000' || itemid === '11210101000000RSJD5212000289000' || itemid === '11210101000000RSJD5212000267000' || itemid === '11210101000000FCJD5212000334000' || itemid === '11210101000000FCJD5212000472000' || itemid === '11210101000000FCJD5212000473000') {
          this.$router.push({
            name: 'handinformation',
            params: {
              itemid: itemid,
              cardno: this.cardno,
              operation: '1'
            }
          })
        } else {
          this.$Notice.error({ title: '错误', desc: '获取链接失败，请重试' })
        }
      } else {
        this.$Notice.warning({ title: '无用户信息', desc: '请先获取用户信息后再办理事项' })
      }
    },
    // 低保对象过滤
    formatLowPerson (val) {
      return val === '1010' ? '城市低保对象' : val === '1020' ? '城市边缘户对象' : val === '1030' ? '农村低保对象' : val === '1040' ? '农村边缘户对象' : val === '9999' ? '非保障对象' : ''
    },
    // 查询户籍情况
    getHouseholdRegister () {
      var param = { 'IDcard': this.cardno, 'Name': this.usernname }
      getRegisterInfo(param).then(ret => {
        if (ret.data.errcode === 0) {
          this.registerFlag = ret.data.data.result
          if (ret.data.data.result === '-1') {
            this.register = '非沈阳户籍'
          } else if (ret.data.data.result === '0') {
            this.register = '沈阳有效户籍'
          } else if (ret.data.data.result === '1') {
            this.register = '户籍已删除'
          } else if (ret.data.data.result === '2') {
            this.register = '户籍被加锁'
          } else if (ret.data.data.result === '3') {
            this.register = '重错号'
          } else if (ret.data.data.result === '4') {
            this.register = '跨市重错号'
          } else if (ret.data.data.result === '6') {
            this.register = '持证'
          } else if (ret.data.data.result === '7') {
            this.register = '在逃犯'
          } else if (ret.data.data.result === '8') {
            this.register = '户籍已迁出沈阳'
          } else if (ret.data.data.result === '9') {
            this.register = '死亡'
          }
          return
        }
        this.$Modal.error({
          title: '错误',
          content: ret.data.errmsg
        })
      })
    },
    // 查询是否为孤儿
    getOrphanByCard () {
      let param = { 'cardno': this.cardno }
      getOrphanByCard(param).then(ret => {
        if (ret.data.errcode === 0) {
          this.orphan = '是孤儿人员'
        } else {
          this.orphan = ''
        }
      })
    },
    // 查询是否为工伤护理人员
    getOccupationalInfo () {
      let param = { 'cardno': this.cardno }
      console.log(this.cardno)
      getOccupationalInfo(param).then(ret => {
        let result = ret.data.data
        console.log(ret.data.data, 'rrrrrrr')
        if (result.res === '有数据') {
          this.occupationa = '领取工伤补贴人员'
        } else if (result.res === undefined) {
          console.log(result, '!@@@@@')
          this.occupationa = '接口调用不通'
        } else {
          this.occupationa = '非领取工伤补贴人员'
        }
      })
    },
    // 查询是否办理过补贴
    getInfoByCard (id) {
      let param = { 'cardno': this.cardno }
      getInfoByCard(param).then(ret => {
        if (ret.data.errcode === 0) {
          if (ret.data.data.length === 1) {
            for (var i = 0; i < ret.data.data.length; i++) {
              if (ret.data.data[i].subsidy_money === 80) {
                this.subsidySituation = '在册领取护理补贴人员'
              } else if (ret.data.data[i].subsidy_money === 100) {
                this.subsidySituation = '在册领取生活补贴人员'
              }
            }
          } else if (ret.data.data.length === 2) {
            this.subsidySituation = '在册领取生活补贴、护理补贴人员'
          } else {
            this.subsidySituation = ''
          }
          let that = this
          if (id === '11210101000000MZJD5212000207000') { // 困难残疾人
            if (that.subsidySituation === '在册领取生活补贴人员' || that.subsidySituation === '在册领取生活补贴、护理补贴人员') {
              this.$Notice.open({
                title: '错误',
                desc: '该人员为在领取过生活补贴人员，不可重复申请'
              })
            } else {
              this.$router.push({
                name: 'handinformation',
                params: { itemid: this.itemInfo.id, cardno: this.cardno, operation: '1', disabledPerson: this.disabledPerson, disabledLevel: this.disabledLevel, DISABLED_NUMBER: this.DISABLED_NUMBER, CJR_ALLOCATION_ID_NAME: this.CJR_ALLOCATION_ID_NAME, FIRST_TIME: this.FIRST_TIME, RESIDENCE: this.RESIDENCE, GUARD_NAME: this.GUARD_NAME, GUARD_PHONE: this.GUARD_PHONE, bank_name: this.bank_name, bank_peoplename: this.bank_peoplename, bank_cardno: this.bank_cardno, low_income_No: this.low_income_No }
              })
              // that.modal1 = true
            }
          } else if (id === '11210101000000MZJD5212000216000') { // 重度残疾人
            if (that.subsidySituation === '在册领取护理补贴人员' || that.subsidySituation === '在册领取生活补贴、护理补贴人员') {
              this.$Notice.open({
                title: '错误',
                desc: '该人员为在领取过护理补贴人员，不可重复申请'
              })
            } else {
              this.$router.push({
                name: 'handinformation',
                params: { itemid: this.itemInfo.id, cardno: this.cardno, operation: '1', disabledPerson: this.disabledPerson, disabledLevel: this.disabledLevel, DISABLED_NUMBER: this.DISABLED_NUMBER, CJR_ALLOCATION_ID_NAME: this.CJR_ALLOCATION_ID_NAME, FIRST_TIME: this.FIRST_TIME, RESIDENCE: this.RESIDENCE, GUARD_NAME: this.GUARD_NAME, GUARD_PHONE: this.GUARD_PHONE, bank_name: this.bank_name, bank_peoplename: this.bank_peoplename, bank_cardno: this.bank_cardno, low_income_No: this.low_income_No }
              })
              // that.modal1 = true
            }
          }
        }
      })
    },
    // 查询是否为特困人员
    getDifficultyByCard () {
      let param = { 'cardno': this.cardno }
      getDifficultyByCard(param).then(ret => {
        if (ret.data.errcode === 0) {
          this.difficulty = '是特困人员'
        } else {
          this.difficulty = ''
        }
      })
    },
    // 查询低保情况
    getLowPerson (cardno) {
      var param1 = {
        'request_map': {
          'azcp0001': this.cardno
        },
        'headers_map': {
          'serialNumber': this.str,
          'idcardNumber': this.cardno
        },
        'url': 'base/queryAssistanceDetail',
        'code': this.cardno
      }
      createPostNew(param1).then(ret => {
        if (ret.data.errcode === 0) {
          if (ret.data.data.rescode === '0000') {
            this.lowInsuredFlag = ret.data.data.data.type
            this.lowInsured = this.formatLowPerson(ret.data.data.data.type)
            this.bank_name = ret.data.data.data.ssca0009
            this.bank_peoplename = ret.data.data.data.ssca0010
            this.bank_cardno = ret.data.data.data.ssca0011
            this.low_income_No = ret.data.data.data.ssca0014
            return
          }
          this.$Modal.error({
            title: '错误',
            content: ret.data.data.memo
            /* onOk: () => {
             this.modal1 = false
             } */
          })
          return
        }
        this.$Modal.error({
          title: '错误',
          content: ret.data.errmsg,
          onOk: () => {
            this.modal1 = false
          }
        })
      })
    },
    // 查询残疾情况
    getDisablePerson (itemId) {
      var param2 = {
        cardno: this.cardno
      }
      findCanlian(param2).then(ret => {
        if (ret.data.errcode === 0) {
          this.disabledPersonFlag = ret.data.data.length
          if (ret.data.data.length === 0) {
            this.disabledPerson = '非残疾人'
            this.disabledLevel = ''
          } else if (itemId === '11210101000000MZJD5212000216000') {
            this.disabledPerson = ret.data.data[0].DISABLED_TYPE_NAME
            this.DISABLED_NUMBER = ret.data.data[0].DISABLED_NUMBER
            this.CJR_ALLOCATION_ID_NAME = ret.data.data[0].CJR_ALLOCATION_ID_NAME
            this.FIRST_TIME = ret.data.data[0].FIRST_TIME
            if (ret.data.data[0].DISABLED_LEVEL !== '一级' && ret.data.data[0].DISABLED_LEVEL !== '二级') {
              this.disabledLevel = '非一，二级'
            } else {
              this.disabledLevel = ret.data.data[0].DISABLED_LEVEL
            }
          } else {
            this.disabledPerson = ret.data.data[0].DISABLED_TYPE_NAME
            this.disabledLevel = ret.data.data[0].DISABLED_LEVEL
            this.DISABLED_NUMBER = ret.data.data[0].DISABLED_NUMBER
            this.CJR_ALLOCATION_ID_NAME = ret.data.data[0].CJR_ALLOCATION_ID_NAME
            this.FIRST_TIME = ret.data.data[0].FIRST_TIME
          }
          return
        }
        this.$Modal.error({
          title: '错误',
          content: ret.data.errmsg,
          onOk: () => {
          }
        })
      })
    },
    // 查询殡葬
    getFuneral () {
      var param1 = {
        'idCode': this.cardno
      }
      getFuneralInfo(param1).then(ret => {
        if (ret.data.errcode === 0) {
          this.funeralPersonnelFlag = ret.data.data.flag
          if (ret.data.data.flag === 'false') {
            this.funeralPersonnel = '未查询到该人员殡葬信息'
            return
          }
          if (ret.data.data.flag === 'true') {
            this.funeralPersonnel = '登记死亡人员,请精神操作'
            return
          }
          this.$Modal.error({
            title: '错误',
            content: ret.data.data.memo
            /* onOk: () => {
              this.modal1 = false
              } */
          })
          return
        }
        this.$Modal.error({
          title: '错误',
          content: ret.data.errmsg,
          onOk: () => {
            this.modal1 = false
          }
        })
      })
    },
    // 根据身份证号获取年龄
    getAge (identityCard) {
      var len = (identityCard + '').length
      if (len === 0) {
        return 0
      } else {
        if ((len !== 15) && (len !== 18)) { // 身份证号码只能为15位或18位其它不合法
          return 0
        }
      }
      var strBirthday = ''
      if (len === 18) { // 处理18位的身份证号码从号码中得到生日和性别代码
        strBirthday = identityCard.substr(6, 4) + '/' + identityCard.substr(10, 2) + '/' + identityCard.substr(12, 2)
      } else if (len === 15) {
        strBirthday = '19' + identityCard.substr(6, 2) + '/' + identityCard.substr(8, 2) + '/' + identityCard.substr(10, 2)
      }
      var birthDate = new Date(strBirthday)
      var nowDateTime = new Date()
      var age = nowDateTime.getFullYear() - birthDate.getFullYear()
      if (nowDateTime.getMonth() < birthDate.getMonth() || (nowDateTime.getMonth() === birthDate.getMonth() && nowDateTime.getDate() < birthDate.getDate())) {
        age--
      }
      return age
    },
    saveInfo () {
      this.modal1 = false
      let item = { id: this.itemInfo.id }
      if (item.id === '11210101000000CLJD5212000229005' || item.id === '11210101000000CLJD5212000229004' || item.id === '11210101000000CLJD5212000229003' || item.id === '11210101000000CLJD5212000229002' || item.id === '11210101000000CLJD5212000229001') {
        authentication({ name: this.usernname, cardno: this.cardno, item_id: this.itemInfo.id }).then(res => {
          if (res.data.errcode === 0) {
            this.ruleData = res.data.data.data
            if (res.data.data.code !== '1') {
              this.$Notice.error({ title: res.data.data.msg })
              return
            }
            this.itemData.aac001 = this.ruleData !== ('' || undefined) ? this.ruleData.aac001 : 0// 主键
            this.itemData.aac002 = this.cardno// 身份证
            this.itemData.aac003 = this.usernname// 姓名
            this.itemData.aec01b = new Date().getFullYear() // 申请年度
            this.modal3 = true
            this.checkTable = ''
          } else {
            this.$Notice.error({ title: res.data.errmsg })
            return false
          }
        })
      } else {
        this.getInfoByCard(item.id)
      }

      // this.$router.push({
      //   name: 'handinformation',
      //   params: { itemid: this.itemInfo.id, cardno: this.cardno, operation: '1', disabledPerson: this.disabledPerson, disabledLevel: this.disabledLevel, DISABLED_NUMBER: this.DISABLED_NUMBER, CJR_ALLOCATION_ID_NAME: this.CJR_ALLOCATION_ID_NAME, FIRST_TIME: this.FIRST_TIME, RESIDENCE: this.RESIDENCE, GUARD_NAME: this.GUARD_NAME, GUARD_PHONE: this.GUARD_PHONE, bank_name: this.bank_name, bank_peoplename: this.bank_peoplename, bank_cardno: this.bank_cardno, low_income_No: this.low_income_No }
      // })
    },
    checkStudentInfo () {
      if (this.itemInfo.id === '11210101000000CLJD5212000229005') {
        var birthDate = new Date(this.cardno.substr(6, 4) + '/' + this.cardno.substr(10, 2) + '/' + this.cardno.substr(12, 2))
        var nowDateTime = new Date()
        var age = nowDateTime.getFullYear() - birthDate.getFullYear()
        if (nowDateTime.getMonth() < birthDate.getMonth() || (nowDateTime.getMonth() === birthDate.getMonth() && nowDateTime.getDate() < birthDate.getDate())) {
          age--
        }
        if (this.itemData.aec011 === '1' && (age < 3 || age > 5)) {
          this.$Notice.error({ title: '学龄前：必须满足年龄在 3 至 5 岁之间', desc: '' })
          return false
        } else if (this.itemData.aec011 === '2' && age < 6) {
          this.$Notice.error({ title: '小学：必须满足年龄在 6 岁及以上', desc: '' })
          return false
        }
      }
      if (!this.itemData.aec01b && (this.itemInfo.id !== '11210101000000CLJD5212000229001' || this.itemInfo.id !== '11210101000000CLJD5212000229002')) {
        this.$Notice.error({ title: '请填写申请年度', desc: '' })
        return false
      }
      if (!this.itemData.aac002 && (this.itemInfo.id === '11210101000000CLJD5212000229003' || this.itemInfo.id === '11210101000000CLJD5212000229002')) {
        this.$Notice.error({ title: '请填写学生身份证', desc: '' })
        return false
      }

      let param = {
        aac001: this.itemData.aac001, // 主键
        aac002: this.itemData.aac002, // 身份证
        aac003: this.itemData.aac003, // 姓名
        aec01b: this.itemData.aec01b, // 申请年度
        aec011: this.itemData.aec011, // 就学阶段
        item_id: this.itemInfo.id
      }

      repeatApplicationValidation(param).then(res => {
        if (res.data.errcode === 0) {
          this.ruleData = res.data.data
          if (this.ruleData.code !== '1') {
            this.checkTable = this.ruleData.msg
            return false
          }
          this.modal3 = false
          this.$router.push({ name: 'handinformation', params: { itemid: this.itemInfo.id, cardno: this.cardno, operation: '1' } })
        } else {
          this.$Notice.error({ title: res.data.errmsg })
        }
      })
    },
    getDisabledInfo (item_id, cardno) { // 查询残疾殡葬前置信息
      var param1 = {
        'method': 'getQSTBCardInfo',
        'disabled_data': {
          'item_id': item_id,
          'cardno': cardno
        },
        'accountid': 'qstb'
      }
      createDisabilityApi(param1).then(ret => {
        if (ret.data.errcode === 0) {
          console.log('!@!@!@!@!@')
          console.log(ret.data.data.data.findCanlianMap, '!@!@!!@!')
          if (!ret.data.data.data.getFuneralInfoMap.hhsj) {
            this.funeralPersonnelFlag = 'false'
            this.funeralPersonnel = '未查询到该人员殡葬信息'
          } else {
            this.funeralPersonnelFlag = 'true'
            this.funeralPersonnel = '火化时间：' + ret.data.data.data.getFuneralInfoMap.hhsj
          }
          if (ret.data.data.data.findCanlianMap.length !== 0) {
            console.log(ret.data.data.data.findCanlianMap[0], '残疾情况')
            this.disabledPersonFlag = 0
            this.disabledLevel = ret.data.data.data.findCanlianMap[0].DISABLED_LEVEL
            this.disabledPerson = ret.data.data.data.findCanlianMap[0].DISABLED_TYPE_NAME
            this.DISABLED_NUMBER = ret.data.data.data.findCanlianMap[0].DISABLED_NUMBER
            this.CJR_ALLOCATION_ID_NAME = ret.data.data.data.findCanlianMap[0].CJR_ALLOCATION_ID_NAME
            this.FIRST_TIME = ret.data.data.data.findCanlianMap[0].FIRST_TIME
          } else {
            this.disabledPersonFlag = 1
            this.disabledLevel = ''
            this.disabledPerson = '非残疾人'
          }
          return
        }
        this.$Modal.error({
          title: '错误',
          content: ret.data.errmsg,
          onOk: () => {
          }
        })
      })
    },
    // 就业创业证打印
    employmentPrint () {
      var param1 = {
        'AAC002': this.cardno
      }
      findEmploymentInfo(param1).then(ret => {
        if (this.loaduser) {
          if (ret.data.errcode === 0) {
            if (ret.data.data.result === '1') {
              this.employmentInfo = ret.data.data
              this.$refs.testprint.listPrintInfoView()
            } else {
              this.employment.modelData = true
            }
          }
        } else {
          this.$Notice.warning({ title: '无用户信息', desc: '请先获取用户信息后再办理事项' })
        }
      })
    }
  },
  watch: {
    searchname (data) {
      this.filterData()
    }
  },
  mounted () {
    let timestamp = new Date().getTime().toString()
    var str1 = Math.ceil(Math.random() * 10)
    var str2 = Math.ceil(Math.random() * 10)
    this.str = str1 + timestamp + str2
    itemtodolist().then(ret => {
      if (ret.data.errcode === 0) {
        var array = ret.data.data
        this.itemlist = array
        this.tablelist = this.itemlist[0].datalist || []
        this.loadData = false
      } else {
        this.loadData = true
      }
    })
  }
}
</script>
